<div id="page_content">
<p id="notice"><%= notice %></p>

<p>
  <b>Name:</b>
  <%= @customer.name %>
</p>

<p>
  <b>House number:</b>
  <%= @customer.house_number %>
</p>

<p>
  <b>Street:</b>
  <%= @customer.street %>
</p>

<p>
  <b>City:</b>
  <%= @customer.city %>
</p>

<p>
  <b>Phone:</b>
  <%= @customer.phone %>
</p>

<p>
  <b>Fax:</b>
  <%= @customer.fax %>
</p>

<p>
  <b>Email:</b>
  <%= @customer.email %>
</p>

<p>
  <b>Registration date:</b>
  <%= @customer.registration_date %>
</p>

<p>
  <b>Person:</b>
  <%= @customer.person %>
</p>

<p>
  <b>Notes:</b>
  <%= @customer.notes %>
</p>


<%= link_to 'Edit', edit_customer_path(@customer) %> |
<%= link_to 'Back', customers_path %>
</div>




Current Rents
<% @CRents.each do |rent| %>
<table class="kp_table">
  <% productInvolved = Product.where(:id => rent.product_id) %>
  <tr>
    <th>Product</th>
    <th>Rent Date</th>
    <th>Due Date</th>
 
  </tr>
  <tr>
    <% productInvolved.each do |pro| %>
    
    <td><%= link_to pro.name, pro %></td>

    <% if pro.rented == 0 %>
    <td><%= rent.date %>
    
    <% else %>
    <td>Returned
    <% end %>
<% end %>

    <td><%= rent.expected_return %></td>
    
   
  </tr>
  </table>
<% end %>



Past Rents



